package com.samluys.filtertab;

import com.samluys.filtertab.base.BaseFilterBean;

/**
 * @Title： 筛选item model
 * @Description：
 * @Author：xuefeng.zhu
 * @Since：2020-03-31
 * @Version：1.0.0
 */
public class FilterItemBean extends BaseFilterBean {

    /**
     * 选项ID
     */
    private int id;
    /**
     * 选项名称
     */
    private String name;
    /**
     * 选择状态
     */
    private boolean isSelected;

    public void setId(int tid) {
        this.id = tid;
    }

    public String getName() {
        return name == null ? "" : name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean getSelected() {
        return isSelected;
    }

    public void setSelected(boolean selected) {
        this.isSelected = selected;
    }

    @Override
    public String getItemName() {
        return name;
    }

    @Override
    public int getId() {
        return id;
    }

    @Override
    public int getSelecteStatus() {
        return isSelected ? 1 : 0;
    }

    @Override
    public void setSelecteStatus(int status) {
        this.isSelected = status == 1 ? true : false;
    }
}
